<div align =center><a><img src="<?= base_url() ?>img/logoijf.gif" width=300 height=40></a><a><img   src="<?= base_url() ?>img/logo.png" width=200 height=70 ></a></div>
<div class="clear"></div>
<h3 class="h3_title"><center><font size="4">INSTITTUTO DR. JOS&Eacute; FROTA</center></h3>
<h3 class="h3_title"><center><font size="4">SERVI&Ccedil;O DE ECOCARDIOGRAMA</center></h3>
<br>
<h3 class="h3_title"><center><font size="4">ECOCARDIOGRAMA BIDIMENSIONAL COM COLOR DOPPLER</center></h3>
<? $i = 0; ?>

<table>
    <tbody>
        <tr><td width=75%"><font size="4">Nome: <?= utf8_decode($laudo['0']->nome); ?></td><td><font size="4">Data: <?= substr($laudo['0']->data, 8, 2); ?>/<?= substr($laudo['0']->data, 5, 2); ?>/<?= substr($laudo['0']->data, 0, 4); ?></td></tr>
        <tr ><td width=75%"><font size="4">RAE: <?= $laudo['0']->rae; ?></td><td><font size="4">PRONTUARIO: <?= $laudo['0']->prontuario; ?></td></tr>
    </tbody>
</table>
<h3><center>MEDIDAS ECOCARDIOGRAFICAS</center></h3>
<!-- Início da tabela de Observações gerais -->
<table border="1">

    <tbody>
        <tr  bgcolor ="gray" class="linha1"><td width="50%">&ensp;</td><td align="center" width="20%"><font size="4">Pacienete</td><td align="center"><font size="4">Par&acirc;metros normais</td></tr>
        <tr class="linha1"><td valign="top" width="50%"><font size="4">Peso</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->peso; ?>Kg</td><td align="center"><font size="4">Kg</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Altura</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->altura; ?>cm</td><td align="center"><font size="4">cm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Di&acirc;m. Diast&oacute;lico do VE</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->diam_diastolico_ve; ?>mm</td><td align="center"><font size="4">36-56 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Di&acirc;m. Sist&oacute;lico Final do VE</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->diam_sisto_final_ve; ?>mm</td><td align="center"><font size="4">25-40 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Espes. Diast&oacute;lica Septo</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->espes_diastolico_septo; ?>mm</td><td align="center"><font size="4">07-11 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Espes. Diast&oacute;lica PP</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->espes_diastolico_pp; ?>mm</td><td align="center"><font size="4">07-11 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Fra&ccedil;&atilde;o de Eje&ccedil;&atilde;o</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->fracao_ejecao; ?>%</td><td align="center"><font size="4">>55%</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Perc. Encurt. Sist. VE</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->perc_encurt_sist_ve; ?>%</td><td align="center"><font size="4">> 27 %</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Di&acirc;metro Aorta</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->diametro_aorta; ?>mm</td><td align="center"><font size="4">< 37 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Di&acirc;metro AE</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->diametro_ae; ?>mm</td><td align="center"><font size="4">22 - 40 mm</td></tr>
        <tr class="linha1"><td width="50%"><font size="4">Diam Basal do VD</td><td align="center" width="20%"><font size="4"><?= $laudo['0']->diam_basal_vd; ?>mm</td><td align="center"><font size="4">< 42 %</td></tr>
    </tbody>
</table>
<?
if ($ObservacoesGerais != null):
    $i++;
    ?>
    <h3><?= $i ?>.OBSERVA&Ccedil;&Otilde;ES GERAIS</h3>
    <? foreach ($ObservacoesGerais as $item) : ?>
    <font size="4"> <?= utf8_decode(ltrim(substr($item->descricao, 7))); ?></font><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($VentEsquerdoDimensoesHipertrofia != null):
    $i++;
    ?>
    <h3><?= $i ?>.VENTR&Iacute;CULO ESQUERDO - DIMENS&Otilde;ES E HIPERTROFIA</h3>
    <? foreach ($VentEsquerdoDimensoesHipertrofia as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>


<?
if ($VentEsquerdoAnaliseSgmentar != null):
    $i++;
    ?>
    <h3><?= $i ?>.VENTR&Iacute;CULO ESQUERDO - AN&Aacute;LISE SEGMENTAR</h3>
    <? foreach ($VentEsquerdoAnaliseSgmentar as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($VentEsquerdoFuncoes != null):
    $i++;
    ?>
    <h3><?= $i ?>.VENTR&Iacute;CULO ESQUERDO - FUN&Ccedil;&Otilde;ES</h3>
    <? foreach ($VentEsquerdoFuncoes as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($Aorta != null):
    $i++;
    ?>
    <h3><?= $i ?>.AORTA</h3>
    <? foreach ($Aorta as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($ValvulaAortica != null):
    $i++;
    ?>
    <h3><?= $i ?>.V&Aacute;LVULA A&Oacute;RTICA</h3>
    <? foreach ($ValvulaAortica as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($AtrioEsquerdo != null):
    $i++;
    ?>
    <h3><?= $i ?>.&Aacute;TRIO ESQUERDO</h3>
    <? foreach ($AtrioEsquerdo as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($Valvulamitral != null):
    $i++;
    ?>
    <h3><?= $i ?>.V&Aacute;LVULA MITRAL</h3>
    <? foreach ($Valvulamitral as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($Ventriculoireito != null):
    $i++;
    ?>
    <h3><?= $i ?>.VENTR&Iacute;CULO DIREITO</h3>
    <? foreach ($Ventriculoireito as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($AtrioDireito != null):
    $i++;
    ?>
    <h3><?= $i ?>.&Aacute;TRIO DIREITO</h3>
    <? foreach ($AtrioDireito as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($ValvulaTricuspide != null):
    $i++;
    ?>
    <h3><?= $i ?>.V&Aacute;LVULA TRIC&Uacute;SPIDE</h3>
    <? foreach ($ValvulaTricuspide as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($Valvulapulmonar != null):
    $i++;
    ?>
    <h3><?= $i ?>.V&Aacute;LVULA PULMONAR</h3>
    <? foreach ($Valvulapulmonar as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($Pericardio != null):
    $i++;
    ?>
    <h3><?= $i ?>.PERIC&Aacute;RDIO</h3>
    <? foreach ($Pericardio as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($EstudoProteses != null):
    $i++;
    ?>
    <h3><?= $i ?>.ESTUDO PR&Oacute;TESES</h3>
    <? foreach ($EstudoProteses as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($AnaliseFluxoDoppler != null):
    $i++;
    ?>
    <h3><?= $i ?>.AN&Aacute;LISE DE FLUXO PELO DOPPLER</h3>
    <? foreach ($AnaliseFluxoDoppler as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<?
if ($AnaliseMapeamentoFluxoCores != null):
    $i++;
    ?>
    <h3><?= $i ?>.AN&Aacute;LISE PELO MAPEAMENTO DE FLUXO DE CORES</h3>
    <? foreach ($AnaliseMapeamentoFluxoCores as $item) : ?>
        <font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>

<? if ($Conclusao != null): ?>
    <h3>&ensp;&ensp;&ensp;&ensp;&ensp;CONCLUS&Atilde;O</h3>
    <? foreach ($Conclusao as $item) : ?>
        &ensp;&ensp;&ensp;&ensp;&ensp;<font size="4"><?= utf8_decode(ltrim(substr($item->descricao, 7))); ?><br>
    <? endforeach; ?>
<? endif; ?>
<br>
<br>
<br>
<label><center>_________________________________________</center></label>
<label><center><font size="4"><?= utf8_decode($laudo['0']->medico); ?></center></label>
<label><center><font size="4"><?= utf8_decode($laudo['0']->crm_cpf); ?></center></label>

<table>
    <? if ($arquivo_pasta != false):
        $x=0;
        foreach ($arquivo_pasta as $value) : ?>
            <?
            $x++;?>

            
            <td><a><img src="<?= base_url() . "arquivos/eco/" . $laudo_id . "/" . $value ?>" width="280" height="210"></a></td>
                        <?if ($x == 3):
                ?><tr></tr>
                            <? 
                           $x =0;
                            endif; ?>
        <? endforeach;
    endif ?>
</table>



